<!--
Running slow external script forces preloader to run for tokens below.
FIXME: remove this after https://crbug.com/421300 is closed.
-->
<script type="text/javascript" src="/resources/slow-script.pl?delay=500"></script>

<script>
function onimgload() {
    if (window.internals) {
        var preloaded = internals.isPreloaded('/resources/network-simulator.php?command=increase-resource-count&path=/loading/resources/preload-test.jpg') ? "TRUE" : "FALSE";
        window.parent.postMessage('Image was preloaded: '+preloaded, '*');
    }
    window.parent.postMessage('imgload', '*');
}
</script>
<img src="/resources/network-simulator.php?command=increase-resource-count&path=/loading/resources/preload-test.jpg" onerror="window.parent.postMessage('imgerror', '*')" onload="onimgload()">
